added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSVSPackageToolbox / MyControl.cs
blob06768375afb71d8429def54ff1dbf6dab2f0ca17
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
10 namespace MyCompany.CSVSToolbox
12 // Set the display name and custom bitmap to use for this item.
13 // The build action for the bitmap must be "Embedded Resource".
14 [DisplayName("ToolboxMemberDemo")]
15 [Description("Custom toolbox item from package LoadToolboxMembers.")]
16 [ToolboxItem(true)]
17 [ToolboxBitmap(typeof(MyControl), "MyControl.bmp")]
18 public partial class MyControl : UserControl
20 public MyControl()
22 InitializeComponent();
25 private void button1_Click(object sender, EventArgs e)
27 OpenFileDialog opg = new OpenFileDialog();
28 opg.Multiselect = false;
29 if (opg.ShowDialog() == DialogResult.OK)
30 this.textBox1.Text = opg.FileName;